from .operation import *
from ._student_info import MALE_NUMBERS

operator = Operator()


FRONT_NUMBERS = [4, 63, 64, 41, 11, 30]


def do_rule(table):
    operator.set_table(table)

    w = {16, 52, 23, 25}

    operator.do_operation(Probabilities({
        Event(operator.move_to_area, 4, AREA_MIDDLE): 0.6,
        Event(operator.move_to_area, 4, AREA_FRONT): 0.1,
        Event(operator.move_to_area, 4, AREA_BACK): 0.3,
    }))

    operator.change_seatmate_except(
        4, list(set(MALE_NUMBERS) - w), list(w))
    
    operator.do_operation(Probabilities({
        Event(operator.move_to_around, 4, 41, 1): 0.9,
        Event(operator.move_to_around, 4, 41, 2): 0.1,
    }))

    operator.do_operation(Probabilities({
        Event(operator.move_to_around, 4, 30, 1): 0.8,
        Event(operator.move_to_around, 4, 30, 2): 0.2,
    }))
